package com.cloud.eurekahystrixprovider.controller;

import com.cloud.eurekahystrixprovider.service.ProviderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author kangwen
 */
@RestController
@RequestMapping("provider")
public class EurekaHystrixProviderController {

	@Resource
	private ProviderService providerService;

	@GetMapping("/hystrix")
	public String hystrix() {
		return providerService.hystrix();
	}

	@GetMapping("/hello")
	public String hello() {
		return providerService.hello();
	}
}
